package ${classInfo.packageName}.convertor;

import ${classInfo.packageName}.entity.${classInfo.className};
import ${classInfo.packageName}.model.${classInfo.className}DTO;
import ${classInfo.packageName}.model.${classInfo.className}Param;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * ${classInfo.classComment} Convertor.
 *
 * @author ${classInfo.author}
 * @date ${.now?string('yyyy-MM-dd HH:mm:ss')}
 */
@Mapper
public interface ${classInfo.className}Convertor {

    ${classInfo.className}Convertor INSTANCE = Mappers.getMapper(${classInfo.className}Convertor.class);

    /**
     * param to entity.
     *
     * @param ${classInfo.className?uncap_first}Param ${classInfo.className?uncap_first}Param
     * @return ${classInfo.className}
     */
    ${classInfo.className} to${classInfo.className}(${classInfo.className}Param ${classInfo.className?uncap_first}Param);

    /**
     * entity to DTO.
     *
     * @param ${classInfo.className?uncap_first} ${classInfo.className?uncap_first}
     * @return ${classInfo.className}DTO
     */
    ${classInfo.className}DTO to${classInfo.className}DTO(${classInfo.className} ${classInfo.className?uncap_first});

    /**
     * entityList to DTOList.
     *
     * @param ${classInfo.className?uncap_first}List ${classInfo.className?uncap_first}List
     * @return ${classInfo.className}DTO
     */
    List<${classInfo.className}DTO> to${classInfo.className}DTOs(List<${classInfo.className}> ${classInfo.className?uncap_first}List);

}
